package com.micro.plugins.mapper.special.mapper;

import com.micro.plugins.mapper.special.provider.InsertListAllColsProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import tk.mybatis.mapper.annotation.RegisterMapper;

import java.util.List;

/**
 * @desc 所有字段
 * @author LevelCoder
 * @version V1.0.0
 * @email LevelCoder@126.com
 * @date 2019/11/7
 */
@RegisterMapper
public interface InsertListAllColsMapper<T>{

    /**
     * 批量插入数据库，所有字段都插入，包括主键
     *
     * @return
     */
    @Options(useGeneratedKeys = true, keyProperty = "uid")
    @InsertProvider(type = InsertListAllColsProvider.class, method = "insertListAllCols")
    int insertListAllCols(List<T> recordList);
}
